import type * as Europe from "./type"
import { request } from "@/http/axios"

/** 根据条件查询欧洲赔率预测数据 */
export function getMatchPredictEurope168Api(data: Europe.MatchPredictEurope168Condition) {
  return request<Europe.MatchPredictEurope168ResponseData>({
    url: "match-predict/europe-168",
    method: "post",
    data
  })
}

/** 获取历史同概统计数据 */
export function getHistoricalSimilarStatsApi(data: {
  prob_home_win_min: number | null
  prob_home_win_max: number | null
  prob_draw_min: number | null
  prob_draw_max: number | null
  prob_away_win_min: number | null
  prob_away_win_max: number | null
}) {
  return request<Europe.HistoricalSimilarResponseData>({
    url: "match-predict/historical-similar",
    method: "post",
    data
  })
}

/** 获取爆冷分析统计数据 */
export function getColdPlayAnalysisStatsApi(data: {
  teamid: number | null
  match_date: string | null
  season_id: number | null
}) {
  return request<Europe.ColdPlayAnalysisResponseData>({
    url: "match-predict/cold-play-analysis",
    method: "post",
    data
  })
}

/** 获取历史同赔数据 */
export function getHistoricalSameOddsApi(data: Europe.HistoricalSameOddsCondition) {
  return request<Europe.HistoricalSameOddsResponseData>({
    url: "match-predict/historical-same-odds",
    method: "post",
    data
  })
}


/** 获取符合条件的比赛明细数据 */
export function getSameOddsMatchDetailsApi(data: Europe.HistoricalSameOddsCondition & {
  // 分页参数
  current_page?: number
  page_size?: number
}) {
  return request<Europe.HistoricalSameOddsResponseData>({
    url: "match-predict/historical-same-odds",
    method: "post",
    data
  })
}

/** 获取队伍实力分析数据 */
export function getTeamStrengthAnalysisApi(data: Europe.TeamStrengthAnalysisCondition) {
  return request<Europe.TeamStrengthAnalysisResponseData>({
    url: "match-predict/team-strength-analysis",
    method: "post",
    data
  })
}

/** 获取球员实力分析数据 */
export function getPlayerStrengthAnalysisApi(data: Europe.PlayerStrengthAnalysisCondition) {
  return request<Europe.PlayerStrengthAnalysisResponseData>({
    url: "match-predict/team-player-strength-analysis",
    method: "post",
    data
  })
}
